<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
//			计算机在存储小数的时候存在误差
//			var num = 10;
//			console.log(num/3);
//			console.log(0.2+0.7);
//			console.log(0.1+0.2);
//			n++ ===> n = n+1; //先运算，在自增
//			++n ===> n = n+1;//先自增，在运算
			
//			var n = 1;
//			n++;// n = n+1;
//			console.log(n);
//			
//			var m = 1;
//			++m;//m = m+1;
//			console.log(m);
			
			
			var num = 1;
			var sum = ++num + 5;//先自增 num=2 2+5=7
			
			var sum1 = num++ + 6;//先运算  num=2 2+6=8   num= num+1 num=3;
			console.log(sum);
			console.log(num);
			console.log(sum1);
			
		
			var a = 1;
			var sum = a++ + 2;

			console.log(a,sum);
			
			
			
		</script>
	</body>
</html>
